#!/bin/bash

set -e

case "$1" in
    configure)
        if [ "$2" ]; then
            update-initramfs -u -k 2.6.32-2-untangle+xen-amd64
        else
            update-initramfs -c -t -k 2.6.32-2-untangle+xen-amd64
            command -v update-grub > /dev/null && update-grub
        fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0


